﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace PPTtoPicture
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        delegate void deldelegatefun(object obj);


        private void button1_Click(object sender, EventArgs e)
        {
            progressBar1.Maximum = 100;
            progressBar1.Value = 0;
            progressBar1.BackColor = Color.Red;
            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                System.Threading.Thread progressBarthread = new System.Threading.Thread(()=>
                {

                });
                System.Threading.Thread.Sleep(3000);
                WPSApi.PPT_To_Bitmap(openFileDialog1.FileName, @"C:\Users\Administrator\Desktop\pic\演示", progressBar1);
                textBox1.Text = progressBar1.Value.ToString();
            }
        }
        public ParSetValue BarValueHander = (int valud ,int max) =>
        {
            //progressBar1.Maximum = max;

        };
    }

    public delegate void ParSetValue(int value ,int max);

}
